//
//  addressChooseVC.m
//  BeautyPicture
//
//  Created by 沈振邦 on 15/11/13.
//  Copyright © 2015年 szb. All rights reserved.
//

#import "addressChooseVC.h"
#import "AddressTableViewCell.h"


@interface addressChooseVC ()<UITableViewDelegate>

@end

@implementation addressChooseVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    self.Temp = indexPath.row - 1;
    for (int i = 0; i < self.addressArry.count; i++) {
        NSIndexPath *path = [NSIndexPath indexPathForRow:i inSection:0];
        AddressTableViewCell *cell = [self.addressInfoTableView cellForRowAtIndexPath:path];
        
        if (indexPath.row == i ) {
            
            cell.yesS.hidden = NO;
        }else{
            cell.yesS.hidden = YES;
        }
        
//        if (i != indexPath.row) {
//            cell.yesS.hidden = YES;
//        }else{
//            
//            cell.yesS.hidden = NO;
//        }
    }

    
    _block(self.addressArry[indexPath.row]);
    [self.navigationController popViewControllerAnimated:YES];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
